Skip to content

chore: Create zizmor.yml#87

Open
ocean wants to merge 13 commits intomainfrom
dev
Open

chore: Create zizmor.yml#87
ocean wants to merge 13 commits intomainfrom
dev

Conversation

@ocean
Copy link
Owner

@ocean ocean commented Mar 11, 2026

Summary by CodeRabbit

  • New Features

    • Added an automated security analysis workflow to CI.
  • Chores

    • Seeded backup metadata and initial configuration, dependency and label records for recoverability.
    • Refined ignore rules to exclude modern database, runtime and backup artifacts.
    • Updated CI workflows with pinned tooling, reduced permissions and improved job handling.
    • Adjusted Dependabot cooldown defaults and added tooling version declarations.

ocean added 5 commits March 5, 2026 09:34
Update .beads/.gitignore with new Dolt server runtime file patterns
and updated structure for v0.59.0. Add Dolt database patterns to
root .gitignore.
Add Zizmor GitHub Action security scanning
@github-advanced-security
Copy link

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d631545a-453e-46d7-b03e-763d78ab645a

📥 Commits

Reviewing files that changed from the base of the PR and between 33356fa and 5a514cb.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • mise.toml
✅ Files skipped from review due to trivial changes (1)
  • mise.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

Walkthrough

Adds backup data under .beads/backup/, refines ignore patterns for Dolt/SQLite artifacts, and updates CI workflows (pinned actions, rustup/tooling changes, secret handling). Adds a new zizmor security workflow and Dependabot cooldown defaults.

Changes

Cohort / File(s) Summary
Gitignore updates
.beads/.gitignore, .gitignore
Reworked ignore rules: explicit .dolt/ and Dolt server artifacts, ephemeral SQLite patterns (e.g. *.sqlite3, journals/shards), removed older legacy DB patterns and consolidated backup/legacy ignores.
Backup state & config
.beads/backup/backup_state.json, .beads/backup/config.jsonl
Adds backup metadata and 13 JSONL config entries (compaction settings, UI labels, types registry, schema version).
Backup dependency & label records
.beads/backup/dependencies.jsonl, .beads/backup/labels.jsonl
Adds 14 dependency relationship records (parent-child and blocks types) and 4 label mappings for issues.
New security workflow
.github/workflows/zizmor.yml
Adds a GitHub Actions workflow to run zizmor security analysis on pushes to main and on PRs using pinned actions.
CI workflow changes
.github/workflows/ci.yml
Pinned actions/checkout/actions/cache, removed pull-requests: write permission, replaced dtolnay/rust-toolchain with inline rustup steps, standardized tooling setup for Rust/Elixir via rustup/mise, adjusted Turso secret handling and result propagation between jobs.
Release workflow changes
.github/workflows/release.yml
Pinned checkout/precompiled action SHAs, replaced rust-toolchain action with rustup commands, switched to gh release upload for artifact uploads.
Dependabot config
.github/dependabot.yml
Added cooldown.default-days: 7 defaults for specified ecosystems (mix, cargo, github-actions).
Tooling config
mise.toml
Adds mise.toml declaring Elixir 1.18.0-otp-27 and Erlang 27.0 tool versions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I nibbled through JSON lines by moonlight,
Pinned actions curled up for the night,
Backups tucked under beads so tight,
Dolt and sqlite hidden out of sight,
Hop—CI hums, and everything’s all right.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title references only one specific file (zizmor.yml) but the changeset includes numerous substantial modifications across multiple files, including workflow changes, backup configurations, gitignore updates, and mise.toml additions. Update the title to reflect the broader scope of changes, such as 'chore: Add security analysis workflow and infrastructure updates' or similar, which better captures the full changeset.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can enable review details to help with troubleshooting, context usage and more.

Enable the reviews.review_details setting to include review details such as the model used, the time taken for each step and more in the review comments.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.gitignore (1)

49-51: Scope these new database ignores to the repo root.

*.db will also hide any future fixture or example databases anywhere in the tree. If these rules are only for bd init artefacts at the top level, anchor them with / instead.

Suggested diff
 # Dolt database files (added by bd init)
-.dolt/
-*.db
+/.dolt/
+/*.db
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore around lines 49 - 51, Anchor the new ignore patterns to the
repository root by replacing the unscoped rules ".dolt/" and "*.db" with
root-anchored patterns (e.g., "/.dolt/" and "/.db") so only top-level bd init
artefacts are ignored; update the .gitignore entry that currently contains
".dolt/" and "*.db" to use leading slashes to avoid hiding fixture/example
databases in subdirectories.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.beads/.gitignore:
- Around line 37-38: The .beads/.gitignore entry "backup/" conflicts with
tracked files added in this PR; remove the churn by either untracking the backup
files or moving canonical data out of the ignored path: run git rm --cached on
the tracked .beads/backup/*.jsonl and .beads/backup/backup_state.json (or
otherwise remove them from the index) so the ignore takes effect, or relocate
the canonical seed files to a non-ignored directory and update any references;
ensure the .beads/.gitignore continues to contain "backup/" if you intend to
keep runtime exports untracked.

In @.github/workflows/zizmor.yml:
- Around line 9-20: The workflow-level permissions block is empty so
GITHUB_TOKEN lacks repo access; add a contents: read permission so the
actions/checkout step can access the repository. Update the permissions object
(either the top-level permissions or the zizmor job permissions) to include
"contents: read" alongside existing "security-events: write" so the Checkout
repository step (uses: actions/checkout@...) succeeds while keeping
persist-credentials: false.

---

Nitpick comments:
In @.gitignore:
- Around line 49-51: Anchor the new ignore patterns to the repository root by
replacing the unscoped rules ".dolt/" and "*.db" with root-anchored patterns
(e.g., "/.dolt/" and "/.db") so only top-level bd init artefacts are ignored;
update the .gitignore entry that currently contains ".dolt/" and "*.db" to use
leading slashes to avoid hiding fixture/example databases in subdirectories.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f5069768-d25f-4511-99bf-bddd0823fb6d

📥 Commits

Reviewing files that changed from the base of the PR and between bbedff2 and 8de2fb0.

📒 Files selected for processing (10)
  • .beads/.gitignore
  • .beads/backup/backup_state.json
  • .beads/backup/comments.jsonl
  • .beads/backup/config.jsonl
  • .beads/backup/dependencies.jsonl
  • .beads/backup/events.jsonl
  • .beads/backup/issues.jsonl
  • .beads/backup/labels.jsonl
  • .github/workflows/zizmor.yml
  • .gitignore

Comment on lines +37 to +38
# Backup data (auto-exported JSONL, local-only)
backup/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

backup/ being ignored conflicts with the tracked files added in this PR.

Git ignore rules do not apply to files already in the index, so the new .beads/backup/*.jsonl and backup_state.json files will still churn on every local export. Either untrack this directory or move any canonical seed data to a non-backup path before merging.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.beads/.gitignore around lines 37 - 38, The .beads/.gitignore entry
"backup/" conflicts with tracked files added in this PR; remove the churn by
either untracking the backup files or moving canonical data out of the ignored
path: run git rm --cached on the tracked .beads/backup/*.jsonl and
.beads/backup/backup_state.json (or otherwise remove them from the index) so the
ignore takes effect, or relocate the canonical seed files to a non-ignored
directory and update any references; ensure the .beads/.gitignore continues to
contain "backup/" if you intend to keep runtime exports untracked.

Comment on lines +9 to +20
permissions: {}

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

For actions/checkout, what GITHUB_TOKENpermissions are required when a workflow setspermissions: {} globally and the job checks out the current repository?

💡 Result:

When you set permissions: {} at the workflow level, all GITHUB_TOKEN permissions become none unless explicitly granted [2]. To let actions/checkout check out the current repository, the job needs:

permissions:
  contents: read

This is the recommended (and effectively required) minimum for actions/checkout when using GITHUB_TOKEN authentication [1].

Sources: [1] [2]


Add contents: read permission for actions/checkout.

With permissions: {} set at the workflow level, the GITHUB_TOKEN receives no permissions unless explicitly granted. The job currently grants only security-events: write, but actions/checkout requires contents: read to access the repository. Without this permission, the workflow will fail at the checkout step before the zizmor scan executes.

Suggested fix
 jobs:
   zizmor:
     runs-on: ubuntu-latest
     permissions:
+      contents: read
       security-events: write
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/zizmor.yml around lines 9 - 20, The workflow-level
permissions block is empty so GITHUB_TOKEN lacks repo access; add a contents:
read permission so the actions/checkout step can access the repository. Update
the permissions object (either the top-level permissions or the zizmor job
permissions) to include "contents: read" alongside existing "security-events:
write" so the Checkout repository step (uses: actions/checkout@...) succeeds
while keeping persist-credentials: false.

claude and others added 5 commits March 15, 2026 09:27
Ran zizmor v1.23.1 against all workflow files and resolved all high-priority
findings (reduced from 30 high to 0 high):

- Pin all action references to commit SHAs to prevent supply-chain attacks:
  - actions/checkout@de0fac2e (v6.0.2)
  - actions/cache@cdf6c1fa (v5)
  - actions/upload-artifact@bbbca2dd (v7)
  - erlef/setup-beam@ee09b1e5 (v1)
  - philss/rustler-precompiled-action@853ac56 (v1.1.4)
- Add persist-credentials: false to all checkout steps (artipacked)
- Remove overly broad pull-requests: write from workflow-level permissions
- Fix template injection in all-checks-pass job by passing needs results
  via env vars rather than inline ${{ }} expressions
- Move Turso secrets from job-level env to step-level env to reduce
  exposure surface (secrets-outside-env)
- Replace dtolnay/rust-toolchain action with direct rustup script calls
  as recommended (superfluous-actions)
- Replace softprops/action-gh-release action with gh release CLI call

Remaining findings: 4 medium secrets-outside-env warnings for Turso secrets,
which require configuring a GitHub Deployment Environment in repo settings.

https://claude.ai/code/session_01EUdjWCLtSWQYY5j4yc8Qb5
…-TYtjO

security: apply zizmor GitHub Actions security improvements
ocean added 2 commits March 21, 2026 17:35
Define project tool versions (Erlang 27.0, Elixir 1.18.0-otp-27) via
mise version manager, replacing reliance on the erlef/setup-beam GitHub
Action which triggers Node.js 20 deprecation warnings.
- Replace erlef/setup-beam GitHub Action with mise version manager
  installed via curl (pure shell, no third-party JS action). This
  eliminates the Node.js 20 deprecation warning that setup-beam triggers.
- Remove `environment: test` from turso-remote-tests job to fix
  "Branch refs/pull/N/merge is not allowed to deploy to test" error.
  The job's if-condition already restricts it to PRs targeting main.
- Add zizmor inline suppressions for secrets-outside-env warnings.
- Add explicit mix local.hex/rebar setup (previously handled by
  setup-beam automatically).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants